package com.ef.service;

import java.util.Date;
import java.util.List;

import com.ef.domain.Leads;
import com.ef.domain.School;
import com.ef.util.CustomExample;
import com.ef.util.PaginationSupport;

public interface LeadsService extends BaseService {

	public PaginationSupport<Leads> findByExample(CustomExample<Leads> example,
			int startIndex, int pageSize);

	public void saveOrUpdate(Leads entity);

	public void delete(Leads entity);

	public Leads findById(Long id);

	public List<Leads> findByAnything(String qitem, int max);

	public List<Leads> findByAnythingInSchool(String qitem, Long id, int max);

	public List<Leads> findByAnythingByCC(String qitem, Long ccid, int max);

	public List<Leads> findByTelephone(String tell);

	public List<Leads> findByTelephoneAccurate(String tell);

	public void refreshDeferLeads();

	/**
	 * 找重复的leads 根据电话号码进行判断;
	 * 
	 * @param leads
	 * @return
	 */
	public List<Leads> findDuplicateLeads(Leads leads);

	public List<Leads> findByMobileOrPhone(String mobile, String phone);

	// search the showuped leads between start and end.
	public List<Leads> findShowUps(Date start, Date end);

	public List<Leads> findShowUpsBySchool(Date start, Date end, School school);

	// 导出Pte的业绩
	public List<Object> exportPteResults(String start, String end,
			String tmList, Long selMarketingPolicyId, String selleadsType,
			Long selAdChannelId, Long selSchoolId);

	// 导出Pte的业绩
	public List<Object> exportPteResults(String start, String end,
			Long selMarketingPlanId,Long selCreateUserId,Long teamid); 

	public List<Object> exportPteLeadResults(String start, String end,
			Long selMarketingPlanId,Long selCreateUserId,Long teamid);
}
